package com.treeroot.springbootwithelastic.com.treeroot.es.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @author treeRoot
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "jd-test")
public class Product {
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String title;
    @Field(type = FieldType.Keyword)
    private String price;
    @Field(type = FieldType.Keyword)
    private String imgUrl;


}
